Jan 14th Load Features: 1- Full 512K Shared Memory Support Memory Map is: $00_0000 - $07_FFFF - 512K Shared RAM (Addressable by: TinyVicky, CPU & DMA) $08_0000 - $0F_FFFF - FLASH - (Addressable by CPU only & Soon by DMA) $10_0000 - $13_FFFF - 256K Cartridge ( RAM Or Flash or Else ) - (Addressable by CPU only & Soon by DMA) $14_0000 - $1F_FFFF - Reserved - Not Used --> Cartridge Memory is Now located @ $10_0000 --> MMU Registers Updated to Support 2M Address Space 2- Enable or Disable Background Color in Text Mode while in Overlay Mode & Turn Sync Off Feature to get Monitor to Sleep MASTER_CTRL_REG_H = $D001 Mstr_Ctrl_Video_Mode = $01 ; 0 - 640x480@60Hz : 1 - 640x400@70hz (text mode) // 0 - 320x240@60hz : 1 - 320x200@70Hz (Graphic Mode & Text mode when Doubling = 1) Mstr_Ctrl_Text_XDouble = $02 ; X Pixel Doubling Mstr_Ctrl_Text_YDouble = $04 ; Y Pixel Doubling Mstr_Ctrl_Turn_Sync_Off = $10 ; Turn the Sync off to make the Monitor go in sleep mode ; 0 = Normal, 1 = Turn Monitor Off Mstr_Ctrl_Show_BG_InOverlay = $10 ; This is will allow the Background to show in Overal, if you still want transparency ; Select Background Color 0 in the BG LUT (which means transparent) ; This way you will see the Graphic Layers underneath ; 0 = Only Foreground in Overlay, 1 = Both FG and BG are shown 3- Mouse Pointer Support // MOUSE_GRP -> $CC00 - $CFFF - Internal Memory - Mouse Graphics // 16x16 Point in Grey level from 0 to 255 // The Mouse always works in 640x480 Coordinate system even when video is in Double Pixeled. There is no Double pixel mode with the mouse. // So write your code accordingly Mouse Pointer Control Register: $D6E0 $D6E0 Mouse_Ctrl_Reg_Low Mouse_Ctrl_Bit[0] = 1'b0 = Mouse Enable, 1'b1: Mouse Disabled Mouse_Ctrl_Bit[1] = 1'b0 = Mode 0 (default), The mouse point where you want it to point with X and Y Pos 1'b1 = Mode 1, legacy mode, where you enter the 3 bytes generated by the PS2 Mouse. $D6E1 Mouse_Ctrl_Reg_Hi $D6E2 Mouse_Ptr_XPos_Low (Read and Write in default Mode) $D6E3 Mouse_Ptr_XPos_Hi (Read and Write in default Mode) $D6E4 Mouse_Ptr_YPos_Low (Read and Write in default Mode) $D6E5 Mouse_Ptr_YPos_Hi (Read and Write in default Mode) $D6E6 Traditial_Mode_Byte0 (This Mode needs to be enabled) $D6E7 Traditial_Mode_Byte1 (This Mode needs to be enabled) $D6E8 Traditial_Mode_Byte2 (This Mode needs to be enabled) $D6E9 Reserved $D6EA Reserved $D6EB F256Jr - PCB Major Rev in ASCII Ex: 'B' $D6EC F256Jr - PCB Minor Rev in ASCII Ex: '0' $D6ED F256Jr - PCB Release Data Rev in BCD Ex: '29' - Day $D6EE F256Jr - PCB Release Data Rev in BCD Ex: '12' - Month $D6EF F256Jr - PCB Release Data Rev in BCD Ex: '23' - Year 4- Interrupt Controller Changes to integrate IEC Signals to help @Gadget make the IEC code more transparent ; Pending Interrupt (Read and Write Back to Clear) ; Below Updated registers: INT_PENDING_REG0 = $D660 ; INT_PENDING_REG1 = $D661 ; INT_PENDING_REG2 = $D662 ; Now Used for the IEC Signals (See below for list) INT_PENDING_REG3 = $D663 ; NOT USED ; Polarity Set INT_POL_REG0 = $D664 ; INT_POL_REG1 = $D665 ; INT_POL_REG2 = $D666 ; Now Used for the IEC Signals (See below for list) INT_POL_REG3 = $D667 ; NOT USED ; Edge Detection Enable INT_EDGE_REG0 = $D668 ; INT_EDGE_REG1 = $D669 ; INT_EDGE_REG2 = $D66A ; Now Used for the IEC Signals (See below for list) INT_EDGE_REG3 = $D66B ; NOT USED ; Mask INT_MASK_REG0 = $D66C ; INT_MASK_REG1 = $D66D ; INT_MASK_REG2 = $D66E ; Now Used for the IEC Signals (See below for list) INT_MASK_REG3 = $D66F ; NOT USED Interrupts 00 - SOF (VICKY) INT0 01 - SOL (VICKY) INT1 02 - KEYBOARD 03 - MOUSE 04 - TIMER0 05 - TIMER1 06 - DMA0_INT 07 - TBD 08 - UART INT 09 - (VICKY) TBD 0A - (VICKY) TBD 0B - (VICKY) TBD 0C - RTC INT (EXT_RTC) 0D - VIA0 INT (EXT VIA) 0E - VIA1 INT (EXT VIA) - For F256K Only 0F - SDCARD INSERT 10 - IEC_DATA_i 11 - IEC_CLK_i 12 - IEC_ATN_i 13 - IEC_SREQ_i 14 - Reserved 15 - Reserved 16 - Reserved 17 - Reserved -There is also an update with the IEC Registers: IEC_INPUT_PORT = $D680 ; Read Only, this is the Value on the BUS IEC_DATA_i = $01 IEC_CLK_i = $02 IEC_ATN_i = $10 IEC_SREQ_i = $80 IEC_OUTPUT_PORT = $D681 ; Read and Write, When you read you read back the value written IEC_DATA_o = $01 IEC_CLK_o = $02 IEC_ATN_o = $10 IEC_NMI_IRQ = $20 ; 1'b0 = The IEC Signals in the Interrupt Controler will trigger an IRQn ; 1'b1 = The IEC Signals in the interrupt Controler will trigger an NMIn ; Don't Forget the NMIn Signal is shared with the "Restore" Circuit outside the FPGA ; So make sure you support the Restore Function in your NMI Service Routine ; For the C64 Keyboard Support in the Jr and the Keyboard in the F256K IEC_RST_o = $40 ; This Resets the IEC and the SIDs, works on RevB F256Jr and F256K IEC_SREQ_o = $80 5- The MATH Block is back - (all of it) ; Unsigned Multiplier In A (16Bits), In B (16Bits), Answer (32Bits) UNSIGNED_MULT_A_LO = $DE00 UNSIGNED_MULT_A_HI = $DE01 UNSIGNED_MULT_B_LO = $DE02 UNSIGNED_MULT_B_HI = $DE03 UNSIGNED_MULT_AL_LO = $DE04 UNSIGNED_MULT_AL_HI = $DE05 UNSIGNED_MULT_AH_LO = $DE06 UNSIGNED_MULT_AH_HI = $DE07 ; Unsigned Multiplier In A (16Bits), In B (16Bits), Answer (32Bits) SIGNED_MULT_A_LO = $DE08 SIGNED_MULT_A_HI = $DE09 SIGNED_MULT_B_LO = $DE0A SIGNED_MULT_B_HI = $DE0B SIGNED_MULT_AL_LO = $DE0C SIGNED_MULT_AL_HI = $DE0D SIGNED_MULT_AH_LO = $DE0E SIGNED_MULT_AH_HI = $DE0F ; Unsigned Divide Denominator A (16Bits), Numerator B (16Bits), ; Quotient (16Bits), Remainder (16Bits) UNSIGNED_DIV_DEM_LO = $DE10 UNSIGNED_DIV_DEM_HI = $DE11 UNSIGNED_DIV_NUM_LO = $DE12 UNSIGNED_DIV_NUM_HI = $DE13 UNSIGNED_DIV_QUO_LO = $DE14 UNSIGNED_DIV_QUO_HI = $DE15 UNSIGNED_DIV_REM_LO = $DE16 UNSIGNED_DIV_REM_HI = $DE17 ;signed Divide Denominator A (16Bits), Numerator B (16Bits), ; Quotient (16Bits), Remainder (16Bits) SIGNED_DIV_DEM_LO = $DE18 SIGNED_DIV_DEM_HI = $DE19 SIGNED_DIV_NUM_LO = $DE1A SIGNED_DIV_NUM_HI = $DE1B SIGNED_DIV_QUO_LO = $DE1C SIGNED_DIV_QUO_HI = $DE1D SIGNED_DIV_REM_LO = $DE1E SIGNED_DIV_REM_HI = $DE1F 6- SDCARD Controller - Which have been reduced down to a simple SPI Controller SPI_CTRL_REG = $DD00 SPI_CTRL_SELECT_SDCARD = $01 ; Read/Write - this Controls the CS of the SDCARD 1 = CS is Enable (i.e. CSn = 1'b0) , when 0 CS is disabled (CSn = 1'b1) ; You need to set for the SDCard to accept the transfer SPI_CTRL_SLOWCLK = $02 ; read/write - When 1 = SPI Clk is 400Khz, When 0 = SPI Clk is 25Mhz SPI_CTRL_BUSY = $80 ; Read Only SPI_DATA_REG = $DD01 ; SPI Tx and Rx - Wait for BUSY to == 0 before reading back or to send something new ; There is NO FIFO in this controller, so you need to wait for the BUSY before sending or Receiving.